home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_bas
/
pbc32.zip
/
PBC$BAS.ZIP
/
MAVGL.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-04-10
|
817b
|
25 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone (C) Copyright 1996 Charon Software, All Rights Reserved |
' | |
' +----------------------------------------------------------------------+
SUB MeanAverageL (Array&(), First%, Last%, Average&, ErrCode%)
ErrCode% = 0
IF First% = 0 THEN
F% = LBOUND(Array&, 1)
ELSE
F% = First%
END IF
IF Last% = 0 OR Last% < First% THEN
L% = UBOUND(Array&, 1)
ELSE
L% = Last%
END IF
FOR Tmp% = F% TO L%
Total& = Total& + Array&(Tmp%)
Count% = Count% + 1
NEXT
Average& = Total& \ CLNG(Count%)
END SUB